<?php
include_once('baseModel.php');
class InventoryInfo {
  public $_table="inventoryInfo";

  public $id;
  public $type;
  public $inventoryTotal;
  public $inventoryOnHand;
  public $inventoryOut;
  public $item_id;
  
  function loadByItemId($id) {
    $query = "SELECT * FROM " . $this->_table . " WHERE item_id = " . $id;
    $results = DBHelper::executeQuery($query);
    if(!$results) {
      return;
    }
    // we know there will be only one result
    $this->populateModel($results[0]);
    return $this;
  }
  
}

?>